package com.aoxin.service.impl.activity;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;

import com.aoxin.mapper.activity.SlfRecommendedThresholdMapper;
import com.aoxin.model.activity.SlfRecommendedThreshold;
import com.aoxin.service.inter.activity.SlfRecommendedThresholdService;
import com.aoxin.util.ErrorUtil;
/**
 * 推荐serviceimpl
 * @author lop
 * @date 2018年5月22日 下午5:57:25
 */
@Service("slfRecommendedThresholdServiceImpl")
public class SlfRecommendedThresholdServiceImpl implements SlfRecommendedThresholdService {
	@Autowired
	SlfRecommendedThresholdMapper  slfrecommendedthresholdmapper;
	@Override
	public List<SlfRecommendedThreshold> getRecommendedThresholdData(SlfRecommendedThreshold slfrecommendedthreshold) {
		return slfrecommendedthresholdmapper.getRecommendedThresholdData(slfrecommendedthreshold);
	}

	@Override
	@Transactional
	public void insertRecommendedThresholdData(SlfRecommendedThreshold slfrecommendedthreshold) {
		Assert.notNull(slfrecommendedthreshold, String.format(ErrorUtil.PARAMETER_NULL, "slfrecommendedthreshold"));
		slfrecommendedthresholdmapper.insertRecommendedThresholdData(slfrecommendedthreshold);
	}

	@Override
	@Transactional
	public void updateRecommendedThresholdData(SlfRecommendedThreshold slfrecommendedthreshold) {
		Assert.notNull(slfrecommendedthreshold, String.format(ErrorUtil.PARAMETER_NULL, "slfrecommendedthreshold"));
		slfrecommendedthresholdmapper.updateRecommendedThresholdData(slfrecommendedthreshold);
		
	}

	@Override
	@Transactional
	public void deleteRecommendedThresholdData(List<Integer> recommendedThresholdId) {
		slfrecommendedthresholdmapper.deleteRecommendedThresholdData(recommendedThresholdId);
		
	}

	
	
}
